/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package org.ex;

import java.util.Arrays;
import java.util.Date;

/**
 * <p>Project: jse2303 - HashCodeDemo
 * <p>Powered by webrx On 2023-07-17 09:22:33
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class HashCodeDemo {
    public static void main(String[] args) {
        System.out.println("中".hashCode());
        System.out.println((int) '中');

        T t = new T();
        //输出一个对象实例，会自动调用toString方法（）;
        System.out.println(t);

        System.out.println(Arrays.toString(new int[3]));

        Date d = new Date();

        int[] ns = new int[3];

    }

    static class T {
        private int id;
        private String name;

        @Override
        public String toString() {
            return "T{" +
                    "id=" + id +
                    ", name='" + name + '\'' +
                    '}';
        }
    }
}
